Conversation
core/Cargo.toml
Outdated
| [features] | ||
| default = ["std"] # "std" | ||
| std = [ | ||
| "scale-info/std", |
There was a problem hiding this comment.
why are not all crates that has default-features = false added here?
For instance codec/std is not enabled and many more....
subxt/src/client/offline_client.rs
Outdated
| /// Return the provided [`RuntimeVersion`]. | ||
| fn runtime_version(&self) -> RuntimeVersion; | ||
| /// Return the [subxt_core::client::ClientState] (metadata, runtime version and genesis hash). | ||
| fn client_state(&self) -> ClientState<T>; |
There was a problem hiding this comment.
If we have this method, then let's give it a default impl too since it's just a concat of a few of the above :)
|
|
||
| /// Return the [subxt_core::client::ClientState] (metadata, runtime version and genesis hash). | ||
| pub fn client_state(&self) -> ClientState<T> { | ||
| let inner = self.inner.read().expect("shouldn't be poisoned"); |
There was a problem hiding this comment.
I guess even with a default impl we'll want this bit anyay though to avoid multiple locks, but it could be seen as an optimisation anyway, so it's all good :)
|
This is great stuff; left another round of comments but all pretty minor things, and we can thing more about docs etc later :) @tadeohepperle if you have time to address the small comments and get things compiling then I'm happy to see this merge now! |
| @@ -31,22 +33,15 @@ pub trait ConstantAddress { | |||
| #[derivative( | |||
| Clone(bound = ""), | |||
| Debug(bound = ""), | |||
| Eq(bound = ""), | |||
| Ord(bound = ""), | |||
| /// A static address to a custom value. | ||
| #[derive(Derivative)] | ||
| #[derivative( | ||
| Clone(bound = ""), | ||
| Debug(bound = ""), | ||
| Eq(bound = ""), | ||
| Ord(bound = ""), |
There was a problem hiding this comment.
Is these changes related to this refactoring? Lots of changes at least
There was a problem hiding this comment.
Yeah, there should be a lot of changes, because we use a lot of types from subxt_core now instead of pulling them from subxt. Additionally we use rust prelude types from alloc instead of from std.
testing/no-std-tests/Cargo.toml
Outdated
There was a problem hiding this comment.
I'm pretty slow and don't understand the comment!
I suppose you mean that we don't test that the generated code is no-std?
There was a problem hiding this comment.
Oh this should be removed, we now test that the generated code compiles in no-std.
niklasad1
left a comment
There was a problem hiding this comment.
awesome, great job.
just some small comments
|
We need another fix in |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/parity-tech-update-for-march/7226/1 |
Introduces a
subxt-corecrate that provides ano_stdcompatible subset ofsubxt's functionality.